<template>
  <div v-loading="state.loading" :style="'height:' + state.height">
    <iframe
      :src="src"
      frameborder="no"
      style="width: 100%; height: 100%"
      scrolling="auto"
    />
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, defineEmits, onMounted } from "vue";


const props: any = defineProps({
  src: {
    type: String,
    required: true,
  },
});
const state = reactive({
  height: document.documentElement.clientHeight - 94.5 + "px;",
  loading: true,
  url: props.src,
});
onMounted(() => {
  setTimeout(() => {
    state.loading = false;
  }, 300);
  window.onresize = function temp() {
    state.height = document.documentElement.clientHeight - 94.5 + "px;";
  };
});
</script>

<style scoped lang="scss"></style>
